package com.acme.bankapp.domain.bank;


public class Bank {
	private int numberOfClients = 0;
	private Client[] clients = new Client [10];
	public void addClient(Client client){
		if (numberOfClients<=10){
			clients[numberOfClients] = client;
			numberOfClients++;
		} else {
			System.out.println("error: clients>10");
		}
	}
	
	public int getNumberOfClients() {
		return numberOfClients;
	}
	
	public Client getClient(int i){
		if (i>10) {
			System.out.println("Error geting clients! (too many)");
			return null; //Exception required
		} else if (i<=0) {
			System.out.println("Error geting clients! (wrong value or no clients in the bank)");
			return null; // Ex
		} else {
			return clients[i-1];
		}
	}
}
